package ModelLayer;


public class PartOrder {
	private int amount;
	private double partPrice;
	private Product p;
	private int partOrderId;
	private SalesOrder so;

	/*
	 * Constructor
	 */
	public PartOrder (int amount, double partPrice, Product p, int partOrderId, SalesOrder so) {
		this.amount = amount;
		this.partPrice = partPrice;
		this.p = p;
		this.partOrderId = partOrderId;
		this.so = so;
	}

	/*
	 * Empty constructor
	 */
	public PartOrder ()
	{
		amount = 0;
		partPrice = 0;
		p = null;	
		partOrderId = 0;
	}

	public PartOrder(Product p, int amount, double partPrice) {
		this.amount = amount;
		this.partPrice = partPrice;
		this.p = p;
	}

	/*
	 * Set and get methods
	 */
	public int getAmount() {
		return amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	public double getPartPrice() {
		return partPrice;
	}

	public void setPartPrice(double partPrice) {
		this.partPrice = partPrice;
	}

	public Product getP() {
		return p;
	}

	public void setP(Product p) {
		this.p = p;
	}

	public int getPartOrderId() {
		return partOrderId;
	}

	public void setPartOrderId(int partOrderId) {
		this.partOrderId = partOrderId;
	}

	public SalesOrder getSo() {
		return so;
	}

	public void setSo(SalesOrder so) {
		this.so = so;
	}

}
